3.272 \(\int \frac {\sqrt {g \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}{a+b \cos (e+f x)} \, dx\)

Optimal. Leaf size=168 \[ \frac {2 (a c-b d) \sqrt {g \sec (e+f x)} \sqrt {\frac {c \cos (e+f x)+d}{c+d}} \Pi \left (\frac {2 b}{a+b};\frac {1}{2} (e+f x)|\frac {2 c}{c+d}\right )}{a f (a+b) \sqrt {c+d \sec (e+f x)}}+\frac {2 d \sqrt {g \sec (e+f x)} \sqrt {\frac {c \cos (e+f x)+d}{c+d}} \Pi \left (2;\frac {1}{2} (e+f x)|\frac {2 c}{c+d}\right )}{a f \sqrt {c+d \sec (e+f x)}} \]

[Out]

2*d*(cos(1/2*e+1/2*f*x)^2)^(1/2)/cos(1/2*e+1/2*f*x)*EllipticPi(sin(1/2*e+1/2*f*x),2,2^(1/2)*(c/(c+d))^(1/2))*(
(d+c*cos(f*x+e))/(c+d))^(1/2)*(g*sec(f*x+e))^(1/2)/a/f/(c+d*sec(f*x+e))^(1/2)+2*(a*c-b*d)*(cos(1/2*e+1/2*f*x)^
2)^(1/2)/cos(1/2*e+1/2*f*x)*EllipticPi(sin(1/2*e+1/2*f*x),2*b/(a+b),2^(1/2)*(c/(c+d))^(1/2))*((d+c*cos(f*x+e))
/(c+d))^(1/2)*(g*sec(f*x+e))^(1/2)/a/(a+b)/f/(c+d*sec(f*x+e))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 1.07, antiderivative size = 168, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2962, 3971, 3859, 2807, 2805, 3975} \[ \frac {2 (a c-b d) \sqrt {g \sec (e+f x)} \sqrt {\frac {c \cos (e+f x)+d}{c+d}} \Pi \left (\frac {2 b}{a+b};\frac {1}{2} (e+f x)|\frac {2 c}{c+d}\right )}{a f (a+b) \sqrt {c+d \sec (e+f x)}}+\frac {2 d \sqrt {g \sec (e+f x)} \sqrt {\frac {c \cos (e+f x)+d}{c+d}} \Pi \left (2;\frac {1}{2} (e+f x)|\frac {2 c}{c+d}\right )}{a f \sqrt {c+d \sec (e+f x)}} \]

Antiderivative was successfully verified.

[In]

Int[(Sqrt[g*Sec[e + f*x]]*Sqrt[c + d*Sec[e + f*x]])/(a + b*Cos[e + f*x]),x]

[Out]

(2*d*Sqrt[(d + c*Cos[e + f*x])/(c + d)]*EllipticPi[2, (e + f*x)/2, (2*c)/(c + d)]*Sqrt[g*Sec[e + f*x]])/(a*f*S
qrt[c + d*Sec[e + f*x]]) + (2*(a*c - b*d)*Sqrt[(d + c*Cos[e + f*x])/(c + d)]*EllipticPi[(2*b)/(a + b), (e + f*
x)/2, (2*c)/(c + d)]*Sqrt[g*Sec[e + f*x]])/(a*(a + b)*f*Sqrt[c + d*Sec[e + f*x]])

Rule 2805

Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Simp
[(2*EllipticPi[(2*b)/(a + b), (1*(e - Pi/2 + f*x))/2, (2*d)/(c + d)])/(f*(a + b)*Sqrt[c + d]), x] /; FreeQ[{a,
 b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[c + d, 0]

Rule 2807

Int[1/(((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])*Sqrt[(c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]]), x_Symbol] :> Dist
[Sqrt[(c + d*Sin[e + f*x])/(c + d)]/Sqrt[c + d*Sin[e + f*x]], Int[1/((a + b*Sin[e + f*x])*Sqrt[c/(c + d) + (d*
Sin[e + f*x])/(c + d)]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && N
eQ[c^2 - d^2, 0] &&  !GtQ[c + d, 0]

Rule 2962

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.)*((a_) + (b_.)*sin[(e_.)
 + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[g^m, Int[(g*Csc[e + f*x])^(p - m)*(b + a*Csc[e + f*x])^m*(c + d*Csc[e
 + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && IntegerQ[m]

Rule 3859

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(3/2)/Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)], x_Symbol] :> Dist[(d*Sqr
t[d*Csc[e + f*x]]*Sqrt[b + a*Sin[e + f*x]])/Sqrt[a + b*Csc[e + f*x]], Int[1/(Sin[e + f*x]*Sqrt[b + a*Sin[e + f
*x]]), x], x] /; FreeQ[{a, b, d, e, f}, x] && NeQ[a^2 - b^2, 0]

Rule 3971

Int[((csc[(e_.) + (f_.)*(x_)]*(g_.))^(3/2)*Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)])/(csc[(e_.) + (f_.)*(x_)
]*(d_.) + (c_)), x_Symbol] :> Dist[b/d, Int[(g*Csc[e + f*x])^(3/2)/Sqrt[a + b*Csc[e + f*x]], x], x] - Dist[(b*
c - a*d)/d, Int[(g*Csc[e + f*x])^(3/2)/(Sqrt[a + b*Csc[e + f*x]]*(c + d*Csc[e + f*x])), x], x] /; FreeQ[{a, b,
 c, d, e, f, g}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0]

Rule 3975

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(3/2)/(Sqrt[csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)]*(csc[(e_.) + (f_.)*(x_)]
*(d_.) + (c_))), x_Symbol] :> Dist[(g*Sqrt[g*Csc[e + f*x]]*Sqrt[b + a*Sin[e + f*x]])/Sqrt[a + b*Csc[e + f*x]],
 Int[1/(Sqrt[b + a*Sin[e + f*x]]*(d + c*Sin[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b*c -
 a*d, 0] && NeQ[a^2 - b^2, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {g \sec (e+f x)} \sqrt {c+d \sec (e+f x)}}{a+b \cos (e+f x)} \, dx &=\frac {\int \frac {(g \sec (e+f x))^{3/2} \sqrt {c+d \sec (e+f x)}}{b+a \sec (e+f x)} \, dx}{g}\\ &=\frac {d \int \frac {(g \sec (e+f x))^{3/2}}{\sqrt {c+d \sec (e+f x)}} \, dx}{a g}+\frac {(a c-b d) \int \frac {(g \sec (e+f x))^{3/2}}{(b+a \sec (e+f x)) \sqrt {c+d \sec (e+f x)}} \, dx}{a g}\\ &=\frac {\left (d \sqrt {d+c \cos (e+f x)} \sqrt {g \sec (e+f x)}\right ) \int \frac {\sec (e+f x)}{\sqrt {d+c \cos (e+f x)}} \, dx}{a \sqrt {c+d \sec (e+f x)}}+\frac {\left ((a c-b d) \sqrt {d+c \cos (e+f x)} \sqrt {g \sec (e+f x)}\right ) \int \frac {1}{(a+b \cos (e+f x)) \sqrt {d+c \cos (e+f x)}} \, dx}{a \sqrt {c+d \sec (e+f x)}}\\ &=\frac {\left (d \sqrt {\frac {d+c \cos (e+f x)}{c+d}} \sqrt {g \sec (e+f x)}\right ) \int \frac {\sec (e+f x)}{\sqrt {\frac {d}{c+d}+\frac {c \cos (e+f x)}{c+d}}} \, dx}{a \sqrt {c+d \sec (e+f x)}}+\frac {\left ((a c-b d) \sqrt {\frac {d+c \cos (e+f x)}{c+d}} \sqrt {g \sec (e+f x)}\right ) \int \frac {1}{(a+b \cos (e+f x)) \sqrt {\frac {d}{c+d}+\frac {c \cos (e+f x)}{c+d}}} \, dx}{a \sqrt {c+d \sec (e+f x)}}\\ &=\frac {2 d \sqrt {\frac {d+c \cos (e+f x)}{c+d}} \Pi \left (2;\frac {1}{2} (e+f x)|\frac {2 c}{c+d}\right ) \sqrt {g \sec (e+f x)}}{a f \sqrt {c+d \sec (e+f x)}}+\frac {2 (a c-b d) \sqrt {\frac {d+c \cos (e+f x)}{c+d}} \Pi \left (\frac {2 b}{a+b};\frac {1}{2} (e+f x)|\frac {2 c}{c+d}\right ) \sqrt {g \sec (e+f x)}}{a (a+b) f \sqrt {c+d \sec (e+f x)}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 3.89, size = 222, normalized size = 1.32 \[ -\frac {2 i \cot (e+f x) \sqrt {g \sec (e+f x)} \sqrt {-\frac {c (\cos (e+f x)-1)}{c+d}} \sqrt {\frac {c (\cos (e+f x)+1)}{c-d}} \sqrt {c+d \sec (e+f x)} \left (\Pi \left (1-\frac {c}{d};i \sinh ^{-1}\left (\sqrt {\frac {1}{c-d}} \sqrt {d+c \cos (e+f x)}\right )|\frac {d-c}{c+d}\right )-\Pi \left (\frac {b (d-c)}{b d-a c};i \sinh ^{-1}\left (\sqrt {\frac {1}{c-d}} \sqrt {d+c \cos (e+f x)}\right )|\frac {d-c}{c+d}\right )\right )}{a f \sqrt {\frac {1}{c-d}} \sqrt {c \cos (e+f x)+d}} \]

Antiderivative was successfully verified.

[In]

Integrate[(Sqrt[g*Sec[e + f*x]]*Sqrt[c + d*Sec[e + f*x]])/(a + b*Cos[e + f*x]),x]

[Out]

((-2*I)*Sqrt[-((c*(-1 + Cos[e + f*x]))/(c + d))]*Sqrt[(c*(1 + Cos[e + f*x]))/(c - d)]*Cot[e + f*x]*(EllipticPi
[1 - c/d, I*ArcSinh[Sqrt[(c - d)^(-1)]*Sqrt[d + c*Cos[e + f*x]]], (-c + d)/(c + d)] - EllipticPi[(b*(-c + d))/
(-(a*c) + b*d), I*ArcSinh[Sqrt[(c - d)^(-1)]*Sqrt[d + c*Cos[e + f*x]]], (-c + d)/(c + d)])*Sqrt[g*Sec[e + f*x]
]*Sqrt[c + d*Sec[e + f*x]])/(a*Sqrt[(c - d)^(-1)]*f*Sqrt[d + c*Cos[e + f*x]])

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^(1/2)*(c+d*sec(f*x+e))^(1/2)/(a+b*cos(f*x+e)),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {d \sec \left (f x + e\right ) + c} \sqrt {g \sec \left (f x + e\right )}}{b \cos \left (f x + e\right ) + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^(1/2)*(c+d*sec(f*x+e))^(1/2)/(a+b*cos(f*x+e)),x, algorithm="giac")

[Out]

integrate(sqrt(d*sec(f*x + e) + c)*sqrt(g*sec(f*x + e))/(b*cos(f*x + e) + a), x)

________________________________________________________________________________________

maple [C]  time = 2.23, size = 479, normalized size = 2.85 \[ -\frac {2 i \left (2 \EllipticPi \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, -1, i \sqrt {\frac {c -d}{c +d}}\right ) a^{2} d -2 \EllipticPi \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, -1, i \sqrt {\frac {c -d}{c +d}}\right ) b^{2} d +\EllipticF \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \sqrt {-\frac {c -d}{c +d}}\right ) a^{2} c -\EllipticF \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \sqrt {-\frac {c -d}{c +d}}\right ) a^{2} d +\EllipticF \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \sqrt {-\frac {c -d}{c +d}}\right ) a b c -\EllipticF \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \sqrt {-\frac {c -d}{c +d}}\right ) a b d -2 \EllipticPi \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \frac {a -b}{a +b}, i \sqrt {\frac {c -d}{c +d}}\right ) a b c +2 \EllipticPi \left (\frac {i \left (-1+\cos \left (f x +e \right )\right )}{\sin \left (f x +e \right )}, \frac {a -b}{a +b}, i \sqrt {\frac {c -d}{c +d}}\right ) b^{2} d \right ) \cos \left (f x +e \right ) \sqrt {\frac {d +c \cos \left (f x +e \right )}{\left (1+\cos \left (f x +e \right )\right ) \left (c +d \right )}}\, \sqrt {\frac {1}{1+\cos \left (f x +e \right )}}\, \sqrt {\frac {g}{\cos \left (f x +e \right )}}\, \sqrt {\frac {d +c \cos \left (f x +e \right )}{\cos \left (f x +e \right )}}\, \left (\sin ^{2}\left (f x +e \right )\right )}{f \left (-1+\cos \left (f x +e \right )\right ) \left (d +c \cos \left (f x +e \right )\right ) a \left (a -b \right ) \left (a +b \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((g*sec(f*x+e))^(1/2)*(c+d*sec(f*x+e))^(1/2)/(a+b*cos(f*x+e)),x)

[Out]

-2*I/f*(2*EllipticPi(I*(-1+cos(f*x+e))/sin(f*x+e),-1,I*((c-d)/(c+d))^(1/2))*a^2*d-2*EllipticPi(I*(-1+cos(f*x+e
))/sin(f*x+e),-1,I*((c-d)/(c+d))^(1/2))*b^2*d+EllipticF(I*(-1+cos(f*x+e))/sin(f*x+e),(-(c-d)/(c+d))^(1/2))*a^2
*c-EllipticF(I*(-1+cos(f*x+e))/sin(f*x+e),(-(c-d)/(c+d))^(1/2))*a^2*d+EllipticF(I*(-1+cos(f*x+e))/sin(f*x+e),(
-(c-d)/(c+d))^(1/2))*a*b*c-EllipticF(I*(-1+cos(f*x+e))/sin(f*x+e),(-(c-d)/(c+d))^(1/2))*a*b*d-2*EllipticPi(I*(
-1+cos(f*x+e))/sin(f*x+e),(a-b)/(a+b),I*((c-d)/(c+d))^(1/2))*a*b*c+2*EllipticPi(I*(-1+cos(f*x+e))/sin(f*x+e),(
a-b)/(a+b),I*((c-d)/(c+d))^(1/2))*b^2*d)*cos(f*x+e)*((d+c*cos(f*x+e))/(1+cos(f*x+e))/(c+d))^(1/2)*(1/(1+cos(f*
x+e)))^(1/2)*(g/cos(f*x+e))^(1/2)*((d+c*cos(f*x+e))/cos(f*x+e))^(1/2)*sin(f*x+e)^2/(-1+cos(f*x+e))/(d+c*cos(f*
x+e))/a/(a-b)/(a+b)

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {d \sec \left (f x + e\right ) + c} \sqrt {g \sec \left (f x + e\right )}}{b \cos \left (f x + e\right ) + a}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))^(1/2)*(c+d*sec(f*x+e))^(1/2)/(a+b*cos(f*x+e)),x, algorithm="maxima")

[Out]

integrate(sqrt(d*sec(f*x + e) + c)*sqrt(g*sec(f*x + e))/(b*cos(f*x + e) + a), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {\sqrt {c+\frac {d}{\cos \left (e+f\,x\right )}}\,\sqrt {\frac {g}{\cos \left (e+f\,x\right )}}}{a+b\,\cos \left (e+f\,x\right )} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((c + d/cos(e + f*x))^(1/2)*(g/cos(e + f*x))^(1/2))/(a + b*cos(e + f*x)),x)

[Out]

int(((c + d/cos(e + f*x))^(1/2)*(g/cos(e + f*x))^(1/2))/(a + b*cos(e + f*x)), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sqrt {g \sec {\left (e + f x \right )}} \sqrt {c + d \sec {\left (e + f x \right )}}}{a + b \cos {\left (e + f x \right )}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((g*sec(f*x+e))**(1/2)*(c+d*sec(f*x+e))**(1/2)/(a+b*cos(f*x+e)),x)

[Out]

Integral(sqrt(g*sec(e + f*x))*sqrt(c + d*sec(e + f*x))/(a + b*cos(e + f*x)), x)

________________________________________________________________________________________